const key = 'x-token';
let _token_ = null;

export function setToken(token) {
  _token_ = token;
  uni.setStorageSync(key, token)
}

export function getToken() {
  if(!_token_) {
    _token_ = uni.getStorageSync(key);
  }
  return _token_;
}

export function removeToken() {
  _token_ = null;
  uni.removeStorageSync(key)
}